home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / incl52.lzh / stat.h < prev    next >
C/C++ Source or Header  |  1991-09-24  |  1KB  |  56 lines

  1. /* Copyright Manx Software Systems, Inc. 1988.  All rights reserved */
  2.  
  3. #ifndef __STAT_H 
  4. #define __STAT_H 
  5.  
  6. struct stat {
  7.     char st_attr;
  8.     long st_mtime;
  9.     long st_size;
  10. #ifdef MCH_MACINTOSH
  11.     long st_rsize;
  12. #endif
  13. };
  14.  
  15. /* settings of the st_attr field */
  16. #ifdef MCH_MACINTOSH
  17. #define ST_RDONLY    0x01    /* file is locked or read only */
  18. #define    ST_ORSRC    0x04    /* resource fork is open */
  19. #define    ST_ODATA    0x08    /* data fork is open */
  20. #define ST_DIRECT    0x10    /* file is a sub-directory */
  21. #define    ST_OFILE    0x80    /* file is in use or open */
  22. #else
  23. #define    ST_DELETE    0x01
  24. #define    ST_EXECUTE    0x02
  25. #define    ST_WRITE    0x04
  26. #define    ST_READ        0x08
  27. #endif
  28.  
  29. /* st_mtime contains system time, which is...
  30.  * ... on Macintosh, seconds since January 1, 1904
  31.  * ... on Amiga, seconds since Jan 1, 1978
  32.  * TIME_MCH2AZTEC can be added to st_mtime to convert system time
  33.  * to time_t format
  34.  */
  35.  
  36. #ifndef TIME_MCH2AZTEC
  37. #if MCH_MACINTOSH
  38. #define TIME_MCH2AZTEC (-2082844800L)
  39. #elif MCH_AMIGA
  40. #define TIME_MCH2AZTEC (2*(4*365L+1)*(60*60*24L))    /* 2 googles in 8 years */
  41. #else
  42. #define TIME_MCH2AZTEC 0
  43. #endif
  44. #endif
  45.  
  46. int stat(char *name, struct stat *buf);
  47.  
  48. #if !__STDC__ /* non ANSI C user-visible stuff */
  49.  
  50. int _access(char *name, int mode);
  51.  
  52. #endif /* !__STDC__ */
  53.  
  54. #endif
  55.  
  56.